<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>在线设计_浙江装饰网</title>
</head>
<style type="text/css">
    body {
        overflow: auto;
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;}
    iframe{
        position: absolute;
        width: 100%;
        height: 100%;
        border: 0;
        z-index: 8;}
</style>
<body style="margin: 0;padding: 0;">
<iframe id="main" frameborder="no" scrolling="no" marginheight="0" marginwidth="0" border="0" src="<{$result->errorMsg}>" id="main">
</iframe>

<script type="text/javascript">
    if (window.postMessage) {
        var callback = function(ev) {
            console ? console.log("ev:" + ev) : alert("ev.data" + ev.data);
            if (ev.origin === 'http://www.kujiale.com' ||
                    ev.origin === 'http://yun.kujiale.com' ||
                    ev.origin === 'https://www.kujiale.com' ||
                    ev.origin === 'https://yun.kujiale.com') {
                // handle message in ev ...
                var data = JSON.parse(ev.data);
                doaction(data);
            }
        };
        if ('addEventListener' in document) {
            window.addEventListener('message', callback, false);
        } else if ('attachEvent' in document) {
            window.attachEvent('onmessage', callback);
        }
    } else {
        // 如果不支持postMessage， 则使用ie6/7的window共有属性navigator进行hack
        window.navigator.listenKJL = function(msg) {
            alert("msg:" + msg);
            // var data = JSON.parse(ev.data)
        };
    }

    //回调函数
    function doaction(data){
        if(data.action=='kjl_completed'){ //点击完成
            if(data.type=='des'){
                window.location.href = '/ucenter/member/mydesign-index.html';
            }else{
                window.location.href = '/ucenter/member/mydesign-index.html';
            }
        }
        if(data.action=='kjl_navigate'){ //点击完成

        }

    }
</script>
</body>
</html>